package entity

type AnswerRecord struct {
	Id          int64  `gorm:"column:id;primary_key" json:"id"`
	UserId      string `gorm:"column:user_id;type:varchar(32);not null" json:"user_id"`
	Difficulty  int    `gorm:"column:difficulty;type:integer;not null" json:"difficulty"`
	FirstLevel  int    `gorm:"column:first_level;type:integer;not null" json:"first_level"`
	SecondLevel int    `gorm:"column:second_level;type:integer;not null" json:"second_level"`
	Desc        string `gorm:"column:desc;type:varchar(255);not null" json:"desc"`
	AnswerValue string `gorm:"column:answer_value;type:varchar(255);not null" json:"answer_value"`
	CorrectNum  int    `gorm:"column:correct_num;type:integer;not null" json:"correct_num"`
	Total       int    `gorm:"column:total;type:integer;not null" json:"total"`
	Star        int    `gorm:"column:star;type:integer;not null" json:"star"`
	CreatedAt   int64  `gorm:"column:created_at;type:bigint;not null" json:"created_at"`
	UpdatedAt   int64  `gorm:"column:updated_at;type:bigint;not null" json:"updated_at"`
}

func (a *AnswerRecord) TableName() string {
	return "answer_records"
}
